using System;
using Me.Prettyprint.Cassandra.Service;

namespace Me.Prettyprint.Cassandra.Connection
{
    /// <summary>
    /// Connection manager need to be notified of host status. The listener
    /// is used to do it.
    /// </summary>
	public interface ConnectionManagerListener
	{
		string Name
		{
			get;
		}
		void OnHostDown(CassandraHost cassandraHost);
		void OnHostRestored(CassandraHost cassandraHost);
		void OnAllHostsDown();
		void OnSuspendHost(CassandraHost cassandraHost, bool removed);
		void OnUnSuspendHost(CassandraHost cassandraHost, bool readded);
		void OnAddHost(CassandraHost cassandraHost, bool added, string errorMessage, System.Exception e);
		void OnRemoveHost(CassandraHost cassandraHost, bool removed, string message);
	}
}